<?php
//var_dump();
class  AdPositionUser extends BaseModel
{
    public $res;
    public $expire;

    public function getSource()
    {
        return "f_ad_positions_user";
    }

    public function initialize()
    {
        parent::initialize();
        $this->res['res'] = false;
        $this->expire = 60 * 60 * 20;
    }


    public function find_by_user_id_ap_id($uid,$ap_id){
        $conditions = "user_id={$uid} and ap_id={$ap_id}";
        $user_ad = $this->findFirst(
            array(
                $conditions,
            )
        );
        return $user_ad;
    }

}
